package org.example.dto;

import lombok.Data;
import org.example.enums.UserStatus;

import javax.validation.constraints.Min;
import javax.validation.constraints.Max;

/**
 * 用户分页查询DTO
 */
@Data
public class UserPageDTO {
    
    @Min(value = 1, message = "页码必须大于0")
    private Integer page = 1;
    
    @Min(value = 1, message = "每页大小必须大于0")
    @Max(value = 100, message = "每页大小不能超过100")
    private Integer size = 10;
    
    private String keyword;  // 搜索关键词
    
    private UserStatus status;  // 状态筛选
    
    private String sortBy = "createTime";  // 排序字段
    
    private String sortOrder = "desc";  // 排序方向
}